package org.melanesia.sql;

import java.util.HashMap;
import java.util.Map;

import org.melanesia.converters.JavaToJavaConverter;



class QueryMetaData extends AbstractMetaData {

    private Map<String, JavaToJavaConverter> columnConverters = new HashMap<String, JavaToJavaConverter>();
    
    /**
     * Registers class converter for column from a ResultSet.
     * @param columnLabel   column label as returned by {@link java.sql.ResultSetMetaData#getColumnLabel(int)}
     * @param converter     JDBC Type to Java converter
     */
    public void setColumnConverter(String columnLabel, JavaToJavaConverter converter) {
        columnConverters.put(columnLabel, converter);
    }

    public JavaToJavaConverter getColumnConverter(String columnName) {
        return columnConverters.get(columnName);
    }
}
